﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Markup;

namespace SDF
{
    [ContentProperty("Text")]
    public class TextRun: SmartInline
    {
        #region Constructors

        public TextRun()
        { 
        }

        public TextRun(string text)
        {
            Text = text;
        }

        #endregion

        #region Dependency Properties

        public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
            "Text",
            typeof(string),
            typeof(TextRun),
            new FrameworkPropertyMetadata(null));

        #endregion

        #region Properties

        public string Text
        {
            get { return (string)GetValue(TextProperty); }
            set { SetValue(TextProperty, value); }
        }

        #endregion

        #region IsVisualProperty

        protected override bool IsVisualProperty(string propertyName)
        {
            return (propertyName == "Text");
        }

        #endregion
    }
}
